package com.jt.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
//@RequestMapping
@RestController
@PropertySource("classpath:/properties/redis.properties")
public class RedisController {
    @Value("${redis.host}")
    private String host;//="192.168.1.1";
    @Value("${redis.port}")
    private Integer port;//=6379;
    @Value("${pro.redis.Host}")
    private String proHost;
    @Value("${pro.redis.Port}")
    private Integer proPort;

    @RequestMapping("/getMsg")
    public String getMsg(){
        return host+" : "+port;
    }
    @RequestMapping("/getPro")
    public String getPro(){
        return proHost+" : "+proPort;
    }
}
